package controller;
import entity.User;
import java.util.List;
import setvice.UserServiceimpl;
import setvice.UserService;
public class UserController {
    UserService userservice=new UserServiceimpl();
    public boolean UserLogin(Integer id, String passWord){
        return userservice.UserLogin(id,passWord);
    }
    public boolean AdministratorLogin(Integer id,String password){
        return userservice.AdministratorLogin(id,password);
    }
    public boolean registerUser(User user){
        return userservice.registerUser(user);
    }
    public User seekUserById(Integer id) {
        return userservice.seekUserById(id);
    }
    public boolean insertUser(User user){
        return userservice.insertUser(user);
    }
    public boolean deleteUserById(Integer id){
        return userservice.deleteUserById(id);
    }
    public boolean changeUserInformationById(Integer id,User user){
        return userservice.changeUserInformationById(id,user);
    }
    public List<User> seekAllUser() {
        return userservice.seekAllUser();
    }

    public User seekUserByUserName(String userName) {
        return userservice.seekUserByUserName(userName);
    }
}
